# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gphoto2
pkgver=2.5.28
pkgrel=1
pkgdesc="Commandline utilities for accessing cameras"
url="http://www.gphoto.org/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="libgphoto2-dev popt-dev gettext-dev libjpeg-turbo-dev libtool"
checkdepends="bash"
subpackages="$pkgname-lang $pkgname-doc"
source="https://sourceforge.net/projects/gphoto/files/gphoto/$pkgver/gphoto2-$pkgver.tar.bz2
	0001-cast-mtime-to-long-long-to-avoid-32bit-time-issues.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ca83c677bdaf7c16ed2bc22865bdcc24e1c5721dbcd36a76e2ebe8bb992d46614fd012cd8f38b37598b30b6b57e6bf533318f6a0d490e186f3026676249735c8  gphoto2-2.5.28.tar.bz2
6ace9dea620e09b5d90a159496ddc69ca25105440f8fd57d70422b94f36333400394f1c3577b93b5964d9113f546573d4eb1365ac956b21ebbc6a2f496271bfd  0001-cast-mtime-to-long-long-to-avoid-32bit-time-issues.patch
"
